package com.whxy02.tolearn.app.beans;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * 题目详情表
 */


//@Entity
//@Table(name="tb_question")
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("tb_question")
public class Question {
//    @Id
//    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @TableId(value = "question_id",type = IdType.AUTO)
    private Integer questionId;
    private Integer typeId=1;                  //题型分类
    private Integer tagsId=1;                    //标签
    private String title="模拟试题";
    private Date createTime=new Date();
    private String grade="未知";                  //目标年级（保留）
    private Integer subjectId=1;
    private String level="普通";                  //难度
    private Integer stars=0;
    private String commentId="1";
    @TableField(exist = false)
    private String[] content;
    @TableField(exist = false)
    private Integer display=1;

    @TableField(exist = false)
    private String subject;
    @TableField(exist = false)
    private String tags;
    @TableField(exist = false)
    private Date collectionTime;
    @TableField(exist = false)
    private String[] answer;

    public Question setSubject(String subject){
        this.subject=subject;
        return this;
    }

    public Question setTags(String tags){
        this.tags=tags;
        return this;
    }

    public Question setCollectionTime(Date date){
        this.collectionTime=date;
        return this;
    }

    public Question setDisplay(Integer display){
        this.display=display;
        return this;
    }

}
